
/* Focus Portal button in mobile nav */
.focus-portal-nav-btn {
    background: linear-gradient(135deg, #8b5cf6, #6366f1) !important;
    color: white !important;
    border: 2px solid #fbbf24 !important;
    box-shadow: 0 2px 0 #4f46e5, 0 0 10px #8b5cf6 !important;
    animation: portalPulse 2s infinite !important;
    font-weight: 800 !important;
}

.focus-portal-nav-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 0 #4f46e5, 0 0 20px #c084fc !important;
}

.focus-portal-nav-btn:active {
    transform: translateY(2px) !important;
    box-shadow: 0 0 0 #4f46e5, 0 0 20px #8b5cf6 !important;
}

@keyframes portalPulse {
    0%, 100% { box-shadow: 0 2px 0 #4f46e5, 0 0 10px #8b5cf6; }
    50% { box-shadow: 0 2px 0 #4f46e5, 0 0 20px #c084fc; }
}

/* Update mobile nav controls grid to accommodate 5 buttons */
@media (max-width: 767px) {
    .mobile-nav-controls {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 3px !important;
    }
    
    .mobile-nav-controls .btn {
        font-size: 10px !important;
        padding: 5px 3px !important;
        min-height: 38px !important;
    }
}

@media (max-width: 479px) {
    .mobile-nav-controls {
        gap: 2px !important;
    }
    
    .mobile-nav-controls .btn {
        font-size: 9px !important;
        padding: 4px 2px !important;
        min-height: 36px !important;
    }
}

@media (max-width: 359px) {
    .mobile-nav-controls .btn span {
        display: inline !important; /* Keep text visible */
        font-size: 8px !important;
    }
    
    .mobile-nav-controls .btn {
        font-size: 8px !important;
    }
}

/* Tablet adjustments */
@media (min-width: 480px) and (max-width: 767px) {
    .mobile-nav-controls .btn {
        font-size: 11px !important;
        padding: 6px 5px !important;
    }
}

/* Prevent scrolling beyond content in focus mode */
body.focus-mode {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed !important;
    width: 100% !important;
}

body.focus-mode .main-content {
    height: 100vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

body.focus-mode .focus-mode-panel {
    min-height: 100vh !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Hide all non-focus content */
body.focus-mode .dashboard-header,
body.focus-mode .dashboard-grid,
body.focus-mode .footer,
body.focus-mode .quick-stats,
body.focus-mode .content-card,
body.focus-mode .form-card,
body.focus-mode .streak-card,
body.focus-mode .motivation-card,
body.focus-mode .pro-tip,
body.focus-mode .controls-bar,
body.focus-mode .stats-overview-cards,
body.focus-mode .charts-container,
body.focus-mode .toast-container,
body.focus-mode .feedback-btn,
body.focus-mode .chatbot-fab,
body.focus-mode .student-view-bar,
body.focus-mode .mobile-nav-controls {
    display: none !important;
}

/* Ensure focus panel is visible and full height */
body.focus-mode .focus-mode-panel {
    display: block !important;
}

/* Fix for iOS overscroll */
body.focus-mode::after {
    display: none !important;
}

/* Persona Section Header - Theme Adaptive */
.persona-section-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--accent-light);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.persona-section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.persona-section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Feature Grid - Theme Adaptive */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: var(--shadow);
}

.feature-card .feature-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.feature-card h3 {
    color: var(--accent);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Persona Card - Theme Adaptive */
.persona-card {
    background: transparent;
    border-radius: 24px;
    padding: 24px;
    max-width: 500px;
    margin: 20px auto;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
    display: none;
}

.persona-card-inner {
    background: linear-gradient(145deg, var(--card), color-mix(in srgb, var(--card) 80%, black));
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition);
}

.persona-card-inner:hover {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent);
}

.persona-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--purple), var(--info), var(--accent));
    animation: neonShimmer 3s infinite;
}

@keyframes neonShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.persona-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    position: relative;
}

.persona-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    border: 2px solid var(--accent);
    box-shadow: 
        0 0 0 3px var(--accent-light),
        0 0 20px var(--accent);
    animation: iconPulse 3s infinite;
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--accent-light), 0 0 20px var(--accent); }
    50% { box-shadow: 0 0 0 6px var(--accent-light), 0 0 40px var(--purple); }
}

.persona-title-container {
    flex: 1;
}

.persona-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.persona-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin: 4px 0 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.persona-level {
    text-align: center;
}

.level-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 6px 12px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 16px;
    border: 1px solid var(--accent);
    box-shadow: 0 0 10px var(--accent);
    display: inline-block;
}

.persona-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.stat-item {
    text-align: center;
}

.stat-label {
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.stat-value {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
}

.persona-chart {
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg);
    border-radius: 16px;
    border: 1px solid var(--border);
}

.chart-title {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 16px 0;
    text-align: center;
    font-weight: 600;
    letter-spacing: 1px;
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 150px;
    gap: 8px;
}

.chart-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.chart-bar {
    width: 100%;
    background: var(--gradient-primary);
    border-radius: 8px 8px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
    box-shadow: 0 0 15px var(--accent);
    position: relative;
}

.chart-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, white, transparent);
    animation: barScan 2s infinite;
}

@keyframes barScan {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.chart-label {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.chart-value {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.persona-description {
    color: var(--text);
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--accent-light);
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    font-style: italic;
}

.persona-quote {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
    position: relative;
}

.persona-quote::before,
.persona-quote::after {
    content: '"';
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
}

.persona-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 14px;
}

.persona-user {
    font-weight: 600;
    color: var(--text);
}

.persona-date {
    font-family: monospace;
}

.persona-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    transform: rotate(15deg);
}

.badge-text {
    background: var(--gradient-danger);
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid var(--warning);
    box-shadow: 0 0 10px var(--danger);
}

/* Controls */
.persona-controls {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
    flex-wrap: wrap;
}

.persona-controls .btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Persona nav button */
.persona-nav-btn {
    background: var(--gradient-primary) !important;
    color: white !important;
    border: 2px solid var(--warning) !important;
    margin-top: 10px !important;
    animation: personaBtnPulse 2s infinite !important;
}

@keyframes personaBtnPulse {
    0%, 100% { box-shadow: 0 0 10px var(--accent); }
    50% { box-shadow: 0 0 20px var(--warning); }
}

/* Persona types showcase - Theme Adaptive */
.persona-types {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 30px 0;
}

.persona-type-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 30px;
    padding: 8px 12px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: all var(--transition);
}

.persona-type-item:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    color: var(--text);
}

.persona-type-item.night-owl { border-left: 4px solid #8b5cf6; }
.persona-type-item.deep-diver { border-left: 4px solid #06b6d4; }
.persona-type-item.sprinter { border-left: 4px solid #eab308; }
.persona-type-item.steady-scholar { border-left: 4px solid #10b981; }
.persona-type-item.unawakened { border-left: 4px solid #64748b; }

/* How It Works Section - Theme Adaptive */
.how-it-works {
    background: var(--bg);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid var(--border);
}

.how-it-works h3 {
    color: var(--accent);
    margin-bottom: 15px;
}

.how-it-works ul {
    color: var(--text-muted);
    line-height: 2;
    list-style-type: none;
    padding: 0;
}

.how-it-works li {
    margin-bottom: 8px;
}

.how-it-works strong {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .persona-types {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .persona-header {
        flex-direction: column;
        text-align: center;
    }
    
    .persona-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .persona-types {
        grid-template-columns: 1fr;
    }
    
    .persona-controls {
        flex-direction: column;
    }
    
    .persona-controls .btn {
        width: 100%;
    }
}